//
//  ESTFollowUpHistoryModel.m
//  ESTSCRMAPP
//
//  Created by 李贤立 on 2018/10/19.
//  Copyright © 2018年 Capfer. All rights reserved.
//

#import "ESTFollowUpHistoryModel.h"

@implementation ESTFollowUpHistoryModel

/**
 客户跟进历史查询

 @param customerID 客户ID
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)requestFollowUpHistoryDataWithCustomerID:(NSString *)customerID success:(void(^)(NSArray<ESTFollowUpHistoryModel *> *modelArray))success failure:(void(^)(NSString *error))failure {
    [NetTool postWithCode:Code_Activity_CUSHistory parameter:@{@"CUST_ID" : customerID} success:^(NSDictionary *result) {
        NSArray *arr = [NSArray arrayWithArray:result[@"DATA_INFO"]];
        NSMutableArray *arrayM = [ESTFollowUpHistoryModel mj_objectArrayWithKeyValuesArray:arr];
        if (success) {
            success([arrayM mutableCopy]);
        }
    } failure:^(NSString *error) {
        if (failure) {
            failure(error);
        }
    }];
}
@end
